{% extends "base.phtml" %}


{% block content %}

<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"></h3>
    </div>

    <form class="form-horizontal" action="saveuser" data-redirect="">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-2 control-label">用户名</label>

                <div class="col-sm-3">
                    <input type="text" name="username" value="{{data?data.username:''}}" class="form-control col-xs-3" placeholder="">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">密码</label>

                <div class="col-sm-3">
                    <input type="password" name="password" value="" class="form-control col-xs-3" placeholder="">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">电话</label>

                <div class="col-sm-3">
                    <input type="text" name="phone" class="form-control col-xs-3" value="{{data?data.phone:''}}" placeholder="">
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-2 control-label">用户组</label>
                <div class="col-sm-3">
                    <select class="form-control" name="groupid">
                        {%for k,v in grouplist%}
                        <option value="{{v.id}}" {%if data and data.groupid==v.id%}selected{%endif%}>{{v.groupname}}</option>
                        {%endfor%}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">所在部门</label>
                <div class="col-sm-3">
                    <select class="form-control" name="busid">
                        <option value="0" {%if data and !data.busid%}selected{%endif%}>无归属业务方</option>
                        {%for k,v in bustype%}
                        <option value="{{k}}" {%if data and data.busid==k%}selected{%endif%}>{{v}}</option>
                        {%endfor%}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">个人介绍</label>
                <div class="col-sm-3">
                    <textarea class="form-control" name="intro" rows="5" placeholder="">{{data?data.intro:''}}</textarea>
                </div>
            </div>

        </div>
        <div class="box-footer  text-center">
            <input type="hidden" name="id" value="{{data?data.id:0}}">
            <button class="btn btn-info submit">保存</button>
        </div>
    </form>
</div>

{% endblock %}